Computer and Modernization ›› 2011, Vol. 193 ›› Issue (9): 215-219.doi: 10.3969/j.issn.1006-2475.2011.09.058

• 应用与开发 • Previous Articles     Next Articles

]Implementation of Reader-writer Lock by Critical Section

SUN Jian-jie, CHEN Jia-pin   

  1. Research Institute of Micro/Nano Science and Technology, Shanghai Jiao Tong University, Shanghai 200240, China
  • Received:2011-04-20 Revised:1900-01-01 Online:2011-09-22 Published:2011-09-22

Abstract: For the lack of a standard reader-writer lock mechanism for the multi-thread synchronization in the Windows environment, the paper discusses three implementations on the reader-writer lock in use of the critical section and gradually reveals the advantages and disadvantages. The design of a reader-writer lock can be achieved by numbers of critical sections, and the different combinations will have the diverse read / write priority tendencies. Because multiple threads try to enter and leave the readerwriter lock on the complex cross-operation, there needs further analysis and testing for the internal details of the critical section in the specific circumstances to ultimately ensure the reliability of the reader-writer lock’s implementation. The paper also provides some details on try-lock mechanism.

Key words: multi-thread synchronization, reader-writer lock, critical section, dead lock, write priority

CLC Number: